package com.caption.api.client.impl;

import com.caption.api.client.FaceAuthClient;
import com.caption.api.client.base.BaseApiClient;
import com.caption.api.entity.ApiResponse;
import com.caption.api.entity.FaceAuthCondition;
import com.caption.api.entity.FaceAuthResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 人脸认证客户端
 */
@Service
@Slf4j
public class FaceAuthClientImpl extends BaseApiClient<ApiResponse<FaceAuthResultDTO>,FaceAuthCondition> implements FaceAuthClient {
    @Override
    public ApiResponse<FaceAuthResultDTO> call(FaceAuthCondition condition) {
        return super.invoke(condition);
    }

    @Override
    public ApiResponse<FaceAuthResultDTO> execute(String interfaceId, FaceAuthCondition faceAuthCondition) {
       log.info("调用人脸认证接口");
        ApiResponse apiResponse=new ApiResponse();
        FaceAuthResultDTO faceAuthResultDTO=new FaceAuthResultDTO(200,"人像认证成功");
        apiResponse.setData(faceAuthResultDTO);
        return apiResponse;
    }

    @Override
    public String getInterfaces() {
        return "A0002";
    }
}
